﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Utilities
{
    public class LogManager
    {
        //path为日志的路径
        private const string logPath = @"E:\data\log\esriLog.log";//该变量应该从数据库中读取，系统参数  
        public static void appendLine(string message)
        {
            
            StreamWriter sw = null;
            DateTime data = DateTime.Now;
            if (File.Exists(logPath))
            {
                using (sw = File.AppendText(logPath))
                {
                    sw.WriteLine(data);
                    sw.WriteLine(message);
                }               
            }
            
        }

    }
}
